<!DOCTYPE html>
<html>
<head lang="zh-CN">

    <link href="../../css/bootstrap.css">
    <style>
        #display_components {
            height: 200px;
        }
        #scopeline_desc {
            height: 200px;
        }
    </style>

</head>
<body>


<div class="container" style="margin-top: 1%; width: 100%; height: 100%;" ng-show="create_scopeline_info">
    <div class="panel panel-default">

        <div class="panel-heading">
            <h4><strong>{{title}}</strong></h4>
        </div>

        <div class="panel-body">

            <table class="table  table-striped">
                <tr>
                    <td class="text-right"><strong>scopebaseline名称: </strong></td>
                    <td><input type="text" class="form-control" ng-model="scopeline_name"></td>
                    <td class="text-right"><strong>DBMigration GitCommitUID: </strong></td>
                    <td><input type="text" class="form-control" ng-model="dbmigration_commitUID" disabled></td>
                </tr>
                <tr>
                    <td class="text-right"><strong>版本号: </strong></td>
                    <td><input type="text" class="form-control" ng-model="scopeline_version"></td>
                    <td class="text-right"><strong>CIMaturity: </strong></td>
                    <td>
                        <select class="form-control" ng-model="selected_ci">
                            <option>draft</option>
                            <option>snapshot</option>
                            <option>alpha</option>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td class="text-right"><strong>UrtrackerIssueIDs(用,分隔): </strong></td>
                    <td><input type="text" class="form-control" ng-model="urtracker_issue"></td>
                    <td class="text-right"><strong>聚义人员: </strong></td>
                    <td><input type="text" class="form-control" ng-model="selected_user_list_str" style="width: auto;" disabled><button ng-click="show_members()" class="btn btn-sm btn-default">选择成员</button></td>
                </tr>
                <tr>
                    <td class="text-right"><strong>风险评估: </strong></td>
                    <td>
                        <select class="form-control" ng-model="selected_riskofassesment">
                            <option>风险可接受</option>
                            <option>风险拒绝</option>
                        </select>
                    </td>
                    <td class="text-right"><strong>请选择关联的环境: </strong></td>
                    <td>
                        <select class="form-control" ng-model="selected_env_name">
                            <option ng-repeat="env in envs">{{env.Name}}</option>
                        </select>
                        <!--<button class="btn btn-sm btn-default">选择环境</button>-->
                    </td>
                </tr>
                <tr>
                   <td class="text-right">请选择组件</td>
                    <td>
                        <textarea id="display_components" ng-model="selected_components_str" class="form-control" disabled>
                        </textarea>
                        <button class="btn btn-sm btn-default" ng-click="show_components('lg')">请选择组件</button>
                    </td>
                    <td class="text-right">scopeline描述</td>
                    <td>
                        <textarea id="scopeline_desc" ng-model="scopeline_desc" class="form-control" >
                        </textarea>
                        <!--<button class="btn btn-sm btn-default" ng-click="show_components('lg')">请选择组件</button>-->
                    </td>
                </tr>
                <tr>
                    <td colspan="4" class="text-center">
                        <button class="btn btn-lg btn-warning" ng-click="create_env()">提交</button>
                    </td>
                </tr>
            </table>
        </div>
    </div>
</div>

<div>
    <script type="text/ng-template" id="selectMemberModal.html">

        <div class="modal-header">
            <h3 class="modal-title">成员列表</h3>
        </div>
        <div class="modal-body">

            <table class="table table-bordered table-striped">

                <tr>
                   <td>选择</td>
                   <td>成员ID:</td>
                   <td>成员名字</td>
                </tr>

                <tr ng-repeat="user in user_list">
                    <!--<td><label><a ng-click="$event.preventDefault(); selected.push(user);">点击选择</a></label></td>-->
                    <td><input type="checkbox" class="checkbox checkbox-inline" ng-model="chk_status" ng-click="selected_and_push(user, chk_status)"></td>
                    <td>{{user.UserID}}</td>
                    <td>{{user.LastName + user.FirstName}}</td>
                </tr>

                <div class="alert alert-info">Selected: {{selected }}</div>

            </table>
            <div class="text-right">
                <nav>
                    <ul class="pagination">
                        <li>
                            <a href ng-click="prev_page()" aria-label="Previous">
                                <span aria-hidden="true">&laquo;</span>
                            </a>
                        </li>
                        <li ng-repeat="page_no in pages" ng-click="set_page()">
                            <a href ng-bind="page_no"></a>
                        </li>
                        <li>
                            <a href ng-click="next_page()" aria-label="Next"><span aria-hidden="true">&raquo;</span></a>
                        </li>
                    </ul>
                </nav>
            </div>
        </div>
        <div class="modal-footer">
            <button class="btn btn-info" ng-click="reset()">重置</button>
            <button class="btn btn-primary" ng-click="ok()">确认</button>
            <button class="btn btn-warning" ng-click="cancel()">取消</button>
        </div>
    </script>
</div>

<div>
    <script type="text/ng-template" id="selectComponentsModal.html">
        <div class="modal-header">
            <div class="modal-title">
                <h3>{{title}}</h3>
            </div>
        </div>
        <div class="modal-body">
            <table class="table table-bordered table-striped">

                <tr>
                    <td>选择</td>
                    <td>组件ID</td>
                    <td>组件名称</td>
                    <td>版本</td>
                    <td>ReleaseNo</td>
                    <td>BuildNo</td>
                    <td>分支名称</td>
                    <td>被禁用了吗</td>
                    <td>QAMaturity</td>
                </tr>

                <tr ng-repeat="com in com_list">
                    <!--<td><label><a ng-click="$event.preventDefault(); selected.push(user);">点击选择</a></label></td>-->
                    <td><input type="checkbox" value="选择" class="checkbox checkbox-inline" ng-model="chk_status" ng-click="selected_and_push(com, chk_status)"></td>
                    <td>{{com.ComponentID}}</td>
                    <td>{{com.Name}}</td>
                    <td>{{com.Version}}</td>
                    <td>{{com.ReleaseNo}}</td>
                    <td>{{com.BuildNo}}</td>
                    <td>{{com.Branch}}</td>
                    <td>{{com.ISDisabled}}</td>
                    <td>{{com.QAMaturity}}</td>
                </tr>

                <div class="alert alert-info">Selected: {{ selected }}</div>

            </table>
            <div class="text-right">
                <nav>
                    <ul class="pagination">
                        <li>
                            <a href ng-click="prev_page()" aria-label="Previous">
                                <span aria-hidden="true">&laquo;</span>
                            </a>
                        </li>
                        <li ng-repeat="page_no in pages" ng-click="set_page()">
                            <a href ng-bind="page_no"></a>
                        </li>
                        <li>
                            <a href ng-click="next_page()" aria-label="Next"><span aria-hidden="true">&raquo;</span></a>
                        </li>
                    </ul>
                </nav>
            </div>
        </div>
        <div class="modal-footer">
            <button class="btn btn-info" ng-click="reset()">重置</button>
            <button class="btn btn-primary" ng-click="ok()">确认</button>
            <button class="btn btn-warning" ng-click="cancel()">取消</button>
        </div>
    </script>
</div>


</body>
</html>